package com.ruoyi.system.domain;

import java.util.Date;
import com.fasterxml.jackson.annotation.JsonFormat;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.ruoyi.common.annotation.Excel;
import com.ruoyi.common.core.domain.BaseEntity;

/**
 * 短信记录对象 code
 * 
 * @author ruoyi
 * @date 2022-05-24
 */
public class Code extends BaseEntity
{
    private static final long serialVersionUID = 1L;

    /** 验证码id */
    private Integer id;

    /** 手机号 */
    @Excel(name = "手机号")
    private String phone;

    /** 验证码 */
    @Excel(name = "验证码")
    private String code;

    /** 添加时间 */
    @Excel(name = "添加时间")
    private Long addtime;

    /** 类型，1 登录注册 */
    @Excel(name = "类型，1 登录注册")
    private Integer type;

    /** 状态 0正常，-1失效 */
    @Excel(name = "状态 0正常，-1失效")
    private Integer status;

    /** $column.columnComment */
    @Excel(name = "${comment}", readConverterExp = "$column.readConverterExp()")
    private Long creator;

    /** $column.columnComment */
    @Excel(name = "${comment}", readConverterExp = "$column.readConverterExp()")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date createDate;

    public void setId(Integer id) 
    {
        this.id = id;
    }

    public Integer getId() 
    {
        return id;
    }
    public void setPhone(String phone) 
    {
        this.phone = phone;
    }

    public String getPhone() 
    {
        return phone;
    }
    public void setCode(String code) 
    {
        this.code = code;
    }

    public String getCode() 
    {
        return code;
    }
    public void setAddtime(Long addtime) 
    {
        this.addtime = addtime;
    }

    public Long getAddtime() 
    {
        return addtime;
    }
    public void setType(Integer type) 
    {
        this.type = type;
    }

    public Integer getType() 
    {
        return type;
    }
    public void setStatus(Integer status) 
    {
        this.status = status;
    }

    public Integer getStatus() 
    {
        return status;
    }
    public void setCreator(Long creator) 
    {
        this.creator = creator;
    }

    public Long getCreator() 
    {
        return creator;
    }
    public void setCreateDate(Date createDate) 
    {
        this.createDate = createDate;
    }

    public Date getCreateDate() 
    {
        return createDate;
    }

    @Override
    public String toString() {
        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
            .append("id", getId())
            .append("phone", getPhone())
            .append("code", getCode())
            .append("addtime", getAddtime())
            .append("type", getType())
            .append("status", getStatus())
            .append("creator", getCreator())
            .append("createDate", getCreateDate())
            .toString();
    }
}
